/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package salarie;

/**
 *
 * @author Gatoper
 */
public class Pay  implements TPay{
    
    private double bonus;
    protected double payRate;
    
//    public void setBonus(double bonus) {
//		this.bonus = bonus;
//    }
//    
//    public void setPayRate(double payrate) {
//            this.payRate = payrate;
//    }
    @Override
    public double applyLegalDeductions() {
            return payRate * 0.05;
    }
    
    @Override
    public double pay(){
                double payment = payRate - this.applyLegalDeductions()+ bonus;
		bonus = 0;
		return payment;
    }
}



	


